﻿@model _1._8._2015_AuthExample.Models.CreateAddressViewModel
@{
    ViewBag.Title = "CreateAddress";
}

<h2>CreateAddress</h2>

@using (Html.BeginForm())
{
    @Html.AntiForgeryToken()
    <div>
        @Html.ValidationSummary(true)
        <div>
            <p>Select user</p>
            @Html.DropDownListFor(m => m.SelectedUserId, new SelectList(Model.Users, "Value", "Display"), "-select user-")
        </div>
        <div>
            <p>Street</p>
            @Html.TextBoxFor(m => m.Street)
            @Html.ValidationMessageFor(m => m.Street)
        </div>
        <div>
            <p>City</p>
            @Html.TextBoxFor(m => m.City)
            @Html.ValidationMessageFor(m => m.City)
        </div>
        <div>
            <p>State</p>
            @Html.TextBoxFor(m => m.State)
            @Html.ValidationMessageFor(m => m.State)
        </div>
        <div>
            <p>Zip</p>
            @Html.TextBoxFor(m => m.Zip)
            @Html.ValidationMessageFor(m => m.Zip)
        </div>
        <div>
            <input type="submit" value="Create Address" />
        </div>
    </div>
    
}